﻿using System;
using System.Collections.Generic;

using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using WLMCoreLibrary;
using SAW_Core;
using Newtonsoft.Json;
using System.Text;

namespace SAW.Ajax
{
    public partial class ListaClientes : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            dbConnector ConexionDB = new dbConnector();
            FuncionesLocales.CheckPagePermision(ref ConexionDB);
            ClientesCollection lista = new ClientesCollection(ref ConexionDB);
            FuncionesLocales.NoCache();
            string cadena = JsonConvert.SerializeObject(lista.Elementos, Newtonsoft.Json.Formatting.Indented);
            Response.Write(cadena);
            ConexionDB.CloseConnection();
        }
    }
}